package cc.lzmsh.controller;

import cc.lzmsh.domain.result.Result;
import cc.lzmsh.domain.vo.CategoryVo;
import cc.lzmsh.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author:   msh
 * Date:     2024/9/14 下午2:32
 * Description:
 */


@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    @RequestMapping("/getCategoryList")
    public Result<List<CategoryVo>> articleList() {
        List<CategoryVo> categoryVos = categoryService.getCategoryList();
        return Result.success(categoryVos);
    }
}
